home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / S-Sh / SEARCHPLUS.cpt / SearchPlus XFCN / cards.xml < prev    next >
Text File  |  1992-03-14  |  9KB  |  37 lines

  1. card_2880.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>2880</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>2721</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3315.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>11</id>
  15.         <text><span class="style1">  This is a new search XFCN which performs the same basic operation as the Search XFCN included with HyperCard, but with four enhancements:   a.    Better ‚ÄúsearchWhole‚Äù characteristics:  The        HC Search XFCN will    find "10" in        ‚Äú1000‚Äù with searchWhole on.   b.    Optional ignore-delimiters feature: By          supplying an ignore-delimiter string, these         characters will be ignored when used while        </span><span class="style5">searchWhole</span><span class="style1"> is on.  This is especially         useful when searching item-organized         lists. (i.e. By setting the ignore-delimiters         string to ‚Äú,‚Äù, you can ignore any commas         in a string    such as ‚Äúitem1,item2,item,....‚Äù)    c.    Unlimited (well, you know) return string         length: The HC Search     XFCN appears to         use a Pascal-type string internally for         returning     results. This limits the result         length to 255 characters.  This     can cause         problems when searching large amounts of        text with </span><span class="style5">howManyHits</span><span class="style1"> set to ‚Äúall.‚Äù       d. Additional information is returned about         the found chunks: Besides the line number         and item number, it also returns item         number     _within_ the line, and the         character number of the container.Parameters passed to this XCMD:    </span><span class="style5">text, searchStr, searchWhole,    ignoreDelim, howManyHits</span><span class="style1">where:   </span><span class="style5">text</span><span class="style1">                 the string in which to search   </span><span class="style5">searchStr</span><span class="style1">       the text you wish to find.   </span><span class="style5">searchWhole</span><span class="style1">   If ‚Äútrue,‚Äù search behaves                             similar to HyperCard‚Äôs find                            whole command. If ‚Äúfalse,‚Äù                             search behaves similar to                            HyperCard‚Äôs find string                             command.   </span><span class="style5">ignoreDelim</span><span class="style1">   List of delimiters to ignore.                             Returns, spaces and tabs are                             default delimiters:  There is no                            need to add them to this list.                            </span><span class="style4">Only valid if </span><span class="style5">searchWhole</span><span class="style4">                            is ‚Äútrue.‚Äù</span><span class="style1">  Helps avoid the                             problem of delimiters                             immediately proceeding or                             following search string (i.e.                             commas).  </span><span class="style4">Do not separate                            the delimiters:</span><span class="style1">  See the                             example below.   </span><span class="style5">howManyHits</span><span class="style1">   If ‚Äúall,‚Äù every occurrence of                             the search string is returned.                             If ‚Äúone‚Äù, only first                                   occurrence is returned.   </span><span class="style4">All five parameters must be supplied.</span><span class="style1">  Pass "" in the </span><span class="style5">ignoreDelim</span><span class="style1"> parameter if there are no additional delimiters or if </span><span class="style5">searchWhole</span><span class="style1"> is ‚Äúfalse.‚Äù   The XFCN returns a comma and return- delimited list in the format:</span><span class="style5"> line1,lineItem1,totalItem1,char1 line2,lineItem2,totalItem2,char2 line3,lineItem3,totalItem3,char3</span><span class="style1">      .                              .                                   .               .      .                              .                                   .               .      .                              .                                   .               .where:   </span><span class="style5">lineN</span><span class="style1">             The line number at which the                           search string was    found.   </span><span class="style5">lineItemN</span><span class="style1">     The item number in the line at                           which the string was found.   </span><span class="style5">totalItemN</span><span class="style1">   The item number within the                           entire text at which the string                           was found.   </span><span class="style5">charN</span><span class="style1">             The character number within                           the entire text at which the                           string was found.   If howManyHits is set to ‚Äúone,‚Äù only one line will be returned.  If    howManyHits is set to ‚Äúall,‚Äù one or more return-delimited lines will be returned.   </span><span class="style4">Note:</span><span class="style1">  In all references to ‚Äúitems‚Äù above, the delimiter for items used is set by HyperCard‚Äôs </span><span class="style5">itemDelimiter</span><span class="style1"> function (not necessarily a comma).  This XFCN retrieves the item delimiter from HyperCard.  Since this XFCN uses the function </span><span class="style5">itemDelimiter</span><span class="style1">, </span><span class="style4">it requires HyperCard version 2.1 or later.</span><span class="style1">Examples:  </span><span class="style5">get SearchPlus(gGlobalVar,"Jimbob",                true,",:","all")</span><span class="style1">  </span><span class="style5">get SearchPlus(cd fld "storage",                theText,false,"","one")</span><span class="style1">   This XFCN supports the use of ‚Äú!‚Äù for returning the author and copyright information and ‚Äú?‚Äù for returning the usage information.  Use these commands in the form:</span><span class="style5">  get SearchPlus("!")</span><span class="style1"></span><span class="style5">  get SearchPlus("?")</span><span class="style1">   Various error messages will be returned in the event that the XFCN fails or the user supplies improper parameters.</span></text>
  16.     </content>
  17.     <content>
  18.         <layer>background</layer>
  19.         <id>1</id>
  20.         <text>SearchPlus XFCN</text>
  21.     </content>
  22.     <content>
  23.         <layer>background</layer>
  24.         <id>26</id>
  25.         <text>by Jim Parshallof Dome Software Corporation</text>
  26.     </content>
  27.     <content>
  28.         <layer>background</layer>
  29.         <id>30</id>
  30.         <text><span class="style1">he SearchPlus XFCN was written by:</span><span class="style4">Jim Parshallof Dome Software Corporation655 W. Carmel Drive, Suite 151Carmel, IN  46032317-573-8100</span><span class="style1"></span><span class="style4">Copyright ¬©1991-92Dome Software CorporationAll Rights Reserved</span><span class="style1">This tool is ‚ÄúFunware.‚Äù  If you wish to use this, you must send something fun (but inexpensive) which represents your company, school or city to the author at the address above.  Examples include: mug, t-shirt, bumper sticker, postcard, pen, key ring,‚Ķ  Other than the fun stuff, this XFCN is provided free to HyperCard developers for </span><span class="style11">non-commercial use</span><span class="style1">.Jim Parshall is a Senior Consultant at Dome.  The son of two wonderful teachers, he received his B.S.E.E. from GMI Engineering & Management Institute in 1988.  He has been programming on the Macintosh for several years using C, Object-C and HyperTalk.Dome Software Corporation is an Indianapolis-based consulting firm which specializes in the strategic application of information technology. It is a leader in client-server design, using Macintoshes, PCs, VAXes, and UNIX boxes, on networks including AppleTalk, DECnet, and TCP/IP.  It has recently released a product, called Parley‚Ñ¢, which provides interprocess communication between the machines previously listed.This XCMD was written in Think C‚Ñ¢.  Copyright ¬©1989 Symantec Corporation.Now, our lawyers insisted that we include this:</span><span class="style4">NEITHER JIM PARSHALL NOR DOME SOFTWARE CORPORATION MAKES ANY WARRANTIES PERTAINING TO THIS XFCN, WHETHER EXPRESSED OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.IN NO EVENT SHALL JIM PARSHALL OR DOME SOFTWARE CORPORATION BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT OR SIMILAR DAMAGES, INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS OR LOST DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS XFCN.</span></text>
  31.     </content>
  32.     <name></name>
  33.     <script></script>
  34. </card>
  35.  
  36.  
  37.